$(function() {
    var isInit = false;
    function init(){
        var center = new qq.maps.LatLng(32.297728, 118.803496);
        var map = new qq.maps.Map(document.getElementById('container'), {
            center: center,
            zoom: 8
        });
        var infoWin = new qq.maps.InfoWindow({
            map: map
        });
        infoWin.open();
        var tpl = [
            '<div class="dt-tips">',
            '<p class="dt-p">地址：江苏省南京市六合区雄州南路399号茉莉国际画家村恒盛园404栋（总部）</p>',
            '<p class="dt-p">电话: 025-66045505 合作热线: 13135666615</p>',
            '<p class="dt-p">邮箱: hezuo@hefatong.com 网址: www.hefatong.com',
            '</div>'
        ];
        //tips  自定义内容
        infoWin.setContent(tpl.join(''));
        infoWin.setPosition(center);
        isInit = true;
    }
    var arr = window.location.search.substr(1).split('&');
    var params = {};
    $.each(arr, function(i,v){
        var ky = v.split('=');
        params[ky[0]] = ky[1];
    });
    params.tab == '3' && init();
    $('.tab-wrap li').eq(2).on('click', function(){
        !isInit && init();
    });
});